pkg_name=xterm
version=316
build_dir=$builds_dir_root/$pkg_name-cross-$version
src_dir=$src_dir_root/$pkg_name-$version
#version is not embedded in file name, anoying
url=http://invisible-island.net/datafiles/release/$pkg_name.tar.gz

#rm -Rf "$src_dir"
#cd "$src_dir_root"
#tar zxf "$pkg_name.tar.gz"

rm -Rf "$build_dir"
mkdir -p "$build_dir"
cd "$build_dir"

export CFLAGS=-O0
"$src_dir/configure"			\
	--prefix=/			\
	--disable-desktop		\
	--without-utempter		\
	--with-x			\
	--with-pkg-config		\
	--without-Xaw3d			\
	--without-Xaw3dxft		\
	--without-neXtaw		\
	--without-XawPlus		\
	--disable-imake			\
	--disable-16-color		\
	--enable-256-color		\
	--disable-88-color		\
	--enable-broken-osc		\
	--disable-exec-xterm		\
	--enable-double-buffer		\
	--disable-hp-fkeys		\
	--disable-sco-fkeys		\
	--disable-sun-fkeys		\
	--disable-logging		\
	--disable-readline-mouse	\
	--disable-regex			\
	--disable-rightbar		\
	--disable-session-mgt		\
	--disable-tcap-fkeys		\
	--disable-tcap-query		\
	--disable-tek4014		\
	--disable-toolbar		\
	--disable-vt52			\
	--disable-16bit-chars		\
	--disable-dabbrev		\
	--disable-dec-locator		\
	--disable-regis-graphics	\
	--disable-sixel-graphics	\
	--disable-ziconbeep		\
	--disable-trace			\
	--without-dmalloc		\
	--without-dbmalloc		\
	--without-valgrind		\
	--disable-leaks			\
	--disable-echo			\
	--disable-xmc-glitch		\
	--disable-warnings		\
	--enable-luit			\
	--disable-input-method		\
	--disable-rpath-hack		
	
unset CFLAGS

exit

make

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"

#install_dirs "$builders_dir_root/$pkg_name/runtime-cross.dirs"
#install_files "$builders_dir_root/$pkg_name/runtime-cross.files" "$install_tmp_dir"
#elf_strip "$builders_dir_root/$pkg_name/elf-strip" 
#
#rm -Rf "$install_tmp_dir"
rm -Rf "$build_dir"
#rm -Rf "$src_dir"
